﻿using AbpVnext_Module.Iservice;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using Ebusiness_Domain.Model;
using AbpVnext_Module.Dto;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Repositories;
using AbpVnext_Module.Repository;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Identity;
using System.Reflection;
using Ebusiness_Domain;

namespace Ebusiness_Application.Service
{
    /// <summary>
    /// 使用Abp领域服务模块Service
    /// </summary>
    [Dependency(ServiceLifetime.Transient)]
    //过滤Api自动控制器
    [RemoteService(IsEnabled = true)]   //true 显示 ，false不显示
    //[LogEnable]  //动态代理 拦截器(aop)
    //[Authorize("Product_Select")]   //Service授权
    public class SysUserService : CrudAppService<SysUser, //模型
                                                       SysUserDto,  //结果出餐
                                                       SysUserPageResultDto,
                                                       Guid, //主键
                                                       SysUserPageDto,//查询入参
                                                       SysUserCreateDto,     //创建入参dto
                                                      SysUserUpdateDto      //更新入参dto
                                                       >, ISysUserService, IRemoteService //使用abp自动api控制器
    {
        public SysUserService(ISysUserRepository sysUserRepository) : base(sysUserRepository)

        {

        }

        public override async Task<SysUserDto> CreateAsync(SysUserCreateDto input)
        {
            try
            {
                //IdentityUser identityUser = new IdentityUser(Guid.NewGuid(), "xxx", "xxxxx");
                //ThreeTest identityUser = new ThreeTest();
                //var w = typeof(ThreeTest).GetProperties();
                //var w2 = typeof(ThreeTest2).GetProperties();
                //var x = typeof(ThreeTest).GetProperty("Name1");
                //x?.SetValue(identityUser, "wwwwwwww");
            }
            catch (Exception ex)
            {
                var msg = ex.Message;
            }
            return await base.CreateAsync(input);
        }

        /// <summary>
        /// 测试股
        /// </summary>
        /// <param name="email"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public Task<SysUserDto> FindByEmailAsync(string email)
        {
            throw new NotImplementedException();
        }
        /// <summary>
        /// 测试股
        /// </summary>
        /// <param name="userName"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public Task<SysUserDto> FindByUsernameAsync(string userName)
        {
            throw new NotImplementedException();
        }
        /// <summary>
        /// 测试股
        /// </summary>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public Task<ListResultDto<SysUserDto>> GetAssignableRolesAsync()
        {
            throw new NotImplementedException();
        }
        /// <summary>
        /// 测试股
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public Task<ListResultDto<SysUserDto>> GetRolesAsync(Guid id)
        {
            throw new NotImplementedException();
        }
        /// <summary>
        /// 测试股
        /// </summary>
        /// <param name="id"></param>
        /// <param name="input"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public Task UpdateRolesAsync(Guid id, SysUserUpdateDto input)
        {
            throw new NotImplementedException();
        }
    }
}
